Show AllShow All

Insert Method

Inserts a cell or a range of cells into the datasheet and shifts other cells away to make space.

expression.Insert(Shift)

expression    Required. An expression that returns one of the objects in the Applies To list.

Shift    Optional XlInsertShiftDirection. Specifies which way to shift the cells.

Example

This example inserts a new row before row four on the datasheet.

myChart.Application.DataSheet.Rows(4).Insert
		

This example inserts new cells at the range A1:C5 on the datasheet and shifts cells downward.

Set mySheet = myChart.Application.DataSheet
mySheet.Range("A1:C5").Insert Shift:=xlShiftDown